/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.model;

import java.awt.Component;

import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;

public class OrderTableCellRenderer extends JComponent implements TableCellRenderer{

	private static final long serialVersionUID = 1L;
	
	TableCellEditor editor;
	public OrderTableCellRenderer(TableCellEditor editor) {
		this.editor = editor;
	}

	public Component getTableCellRendererComponent(JTable table,
			Object value, boolean isSelected, boolean hasFocus, int row,
			int column) {

		return editor.getTableCellEditorComponent(table, value, isSelected,
				row, column);
	}
}

//@Override
//public void mouseMoved(MouseEvent e) {
//	int row = table.rowAtPoint(e.getPoint());
//	int column = table.columnAtPoint(e.getPoint());
//	table.editCellAt(row, column);
//}

//OrderTableCellEditor orderTableCellEditor=new OrderTableCellEditor(order);
//OrderTableCellRenderer orderTableCellRenderer=new OrderTableCellRenderer(orderTableCellEditor);
//TableColumn tableColumn = table.getColumnModel().getColumn(table.getColumnCount()-1);
//tableColumn.setCellRenderer(orderTableCellRenderer);
//tableColumn.setCellEditor(new OrderTableCellEditor(order));
